home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
compuserve-file-archive
/
05 Programming
/
SQ2PRG.TXT
< prev
next >
Wrap
Text File
|
2019-04-13
|
2KB
|
59 lines
This file contains a short program that you can type in and use to read
sequential files. Following the listing are directions on using the program to
convert
sequential program files to tokenized program files.
===============================================================================
5100
open15,8,15:open2,8,2,"0:FILENAME,s,r":gosub5140:printchr$(14)
5110 get#2,a$:printa$;:ifst<>0then5160
5120 ifasc(a$)<>13then5110
5125
getc$:ifc$=""then5110
5130 close2:gosub5140:close15:end
5140 input#15,a,b$,c,d:ifa<20thenreturn
5150 print:print"<RVS>"a,b$,c,d:goto5130
5160
ifst=64thenprint:print"<RVS> END OF FILE":goto5130
5170 print:print"<RVS>STATUS ERROR "st:goto5130
( <RVS>= CNTRL REVERSE ON )
(Don't forget the
semi-colon in line 5110)
===============================================================================
Let's call the program SQ2PRG, since it is
basically designed to help
convert sequential text files to program files; and we will assume that the
sequential program file that you wnat to convert is
called SEQFILE.
List line 5100 and change FILENAME to SEQFILE.
Each time you wish to read SEQFILE type GOT